package fr.umlv.m2.ig.main;

import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import javax.swing.JFrame;

/**
 * Close preferences frames and reactivate the main frame.
 * 
 * @author Gambouele Bertrand.
 * @author Viravout Alexandre.
 *
 */
public class FunctionsFrameWindowAdapter extends WindowAdapter {
	/**
	 * The main frame.
	 */
	private JFrame frame;
	
	public FunctionsFrameWindowAdapter(JFrame f) {
		this.frame = f;
	}
	
	@Override
	public void windowClosing(WindowEvent e) {
		super.windowClosing(e);
		frame.setEnabled(true);
		frame.setVisible(true);
	}
}